In digital audio technology, sample rate conversion refers to changing the rate at which a digital audio stream is output relative to the sampling rate at which the stream was input, producing a new digital audio stream that represents the same analog waveform, with a different sampling rate and a potentially different audio bandwidth. The applications for this in a digital audio system include playback and mixing of multiple streams at input sampling rates that differ from the system rate, and producing variation in pitch, duration, and timbre of interactive audio streams such as sounds in a video game or musical instrument.
Aliasing is a well-known phenomenon in digital audio that occurs when the sampling rate is too low relative to some of the sampled frequency components, causing frequencies to be shifted due to higher frequency waveform cycles occasionally being skipped during the sampling. To prevent aliasing, frequencies above the Nyquist frequency, defined as one-half of the sampling frequency, are filtered out. For example, if using a sampling rate of 48 KHz, an anti-aliasing filter is used to filter out frequency components above 24 KHz.
A common implementation for sample rate converters, such as those used in computer soundcards, have finite impulse response (FIR) filters that filter via stored coefficient sets, e.g., typically four selectable filter coefficient sets. For sample rate converters such as these, the sample input-rate-to-output-rate ratio is used to select one of the filter coefficient sets, which provides the filter cutoff frequency for anti-aliasing filtering.
However, one problem is that this solution limits sample rate conversion to using one of the four cutoff frequencies. This works in some fixed rate scenarios, but still compromises the audio quality in other scenarios, in that selecting among four filters is not particularly fine-grained with respect to the many possible sample rate ratios that may be used.
Another problem is when sample rate conversion is used with dynamically changing ratios, such as to change a sample's pitch over time to simulate the sound of an engine being revved up (or down) in a racing game, or to simulate the Doppler effect for a listener having a relative velocity to a sound source. Indeed, with an audio stream played back with a dynamically changing ratio, audibly noticeable undesirable artifacts occur if the filter coefficients are suddenly changed after a number of sample periods, or if the filter coefficients are not changed at all. In short, the use of such fixed filter cutoff frequencies compromises the audio quality for many fixed-ratio scenarios and nearly all time-varying ratio scenarios.